home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1996 April: Mac OS SDK / Dev.CD Apr 96 SDK / Dev.CD Apr 96 SDK1.toast / Development Kits (Disc 1) / OpenDoc Development Framework / ODFDev / ODF / Found / FWNotifn / Include / FWHFConn.h < prev    next >
Encoding:
Text File  |  1995-11-08  |  2.1 KB  |  83 lines  |  [TEXT/MPS ]

  1. //========================================================================================
  2. //
  3. //    File:                FWHFConn.h
  4. //    Release Version:    $ 1.0d11 $
  5. //
  6. //    Copyright:    (c) 1993, 1995 by Apple Computer, Inc., all rights reserved.
  7. //
  8. //========================================================================================
  9.  
  10. #ifndef FWHFCONN_H
  11. #define FWHFCONN_H
  12.  
  13. #ifndef FWCONNEC_H
  14. #include "FWConnec.h"
  15. #endif
  16.  
  17. #ifndef FWINTERE_H
  18. #include "FWIntere.h"
  19. #endif
  20.  
  21. #ifndef FWORDCOL_H
  22. #include "FWOrdCol.h"
  23. #endif
  24.  
  25. #if FW_LIB_EXPORT_PRAGMAS
  26. #pragma lib_export on
  27. #endif
  28.  
  29. //========================================================================================
  30. // CLASS FW_MReceiver
  31. //========================================================================================
  32.  
  33. class FW_CLASS_ATTR FW_MReceiver
  34. {
  35. public:
  36.     FW_MReceiver();
  37.     virtual ~FW_MReceiver();
  38.  
  39.     virtual void HandleNotification(const FW_CNotification& notification) = 0;
  40. };
  41.  
  42. //========================================================================================
  43. // CLASS FW_CHandleFunctionConnection
  44. //========================================================================================
  45.  
  46. class FW_CLASS_ATTR FW_CHandleFunctionConnection : public FW_CConnection
  47. {
  48. public:
  49.                         FW_CHandleFunctionConnection(FW_MReceiver* receiver);
  50.     virtual            ~FW_CHandleFunctionConnection();
  51.     
  52.     FW_MReceiver*            GetReceiver() const;
  53.         
  54.     virtual void        AddInterest(const FW_CInterest& interest);
  55.     virtual void        RemoveAllInterests();
  56.     virtual void        RemoveInterest(const FW_CInterest& interest);
  57.     
  58.     virtual void        Notify(const FW_CNotification& notification,
  59.                                const FW_CInterest& interest);
  60.                                
  61.     virtual void        Connect();
  62.     virtual void        Disconnect();
  63.  
  64. private:
  65.     FW_MReceiver*            fReceiver;
  66.     FW_CPrivOrderedCollection        fInterestList;
  67. };
  68.  
  69. //----------------------------------------------------------------------------------------
  70. // FW_CHandleFunctionConnection::GetReceiver
  71. //----------------------------------------------------------------------------------------
  72.  
  73. inline FW_MReceiver* FW_CHandleFunctionConnection::GetReceiver() const
  74. {
  75.     return fReceiver;
  76. }
  77.  
  78. #if FW_LIB_EXPORT_PRAGMAS
  79. #pragma lib_export off
  80. #endif
  81.  
  82. #endif
  83.